<?php
$this->breadcrumbs = array(
    'System',
);
?>
<?php if (Yii::app()->user->hasFlash('setting')): ?>
<div class="clearfix">
        <div class="pull-left alert alert-success inline no-margin" style="text-align: center;margin-bottom:20px;width:96%;">
                <button data-dismiss="alert" class="close" type="button">
                        <i class="icon-remove"></i>
                </button>

                <i class="icon-umbrella bigger-120 blue"></i>
                <?php echo Yii::app()->user->getFlash('setting'); ?>
        </div>
</div>
<?php endif; ?> 
<?php $form = $this->beginWidget('CActiveForm', array(
    'id' => 'setting-form-admin-form',
    'enableAjaxValidation' => false,
    'method'=>'post',
    'htmlOptions' => array('enctype' => 'multipart/form-data'),
)); ?>
    <div style='float:left;width:45%;'>
           
            <div class="widget-box">
                  <div class="widget-header">
                      <h4>Cài đặt thông tin website</h4>

                      <span class="widget-toolbar">
                          <a data-action="collapse" href="#">
                              <i class="icon-chevron-up"></i>
                          </a>
                      </span>
                  </div>

                  <div class="widget-body">
                      <div class="widget-main">
                          <div class="row-fluid">
                                 <label class="control-label" for="form-field-2">Title </label>                             
                              <?php echo $form->textField($model, 'title', array('class'=>'input-medium search-query span12')); ?>
                          </div>
                       </div>
                       <div class="widget-main">
                          <div class="row-fluid">
                               <?php echo $form->labelEx($model, 'slogan'); ?>
                              <?php echo $form->textField($model, 'slogan', array('class'=>'input-medium search-query span12')); ?>
                          </div>
                      </div>

                      <div class="widget-main">
                          <div class="row-fluid">
                                 <label class="control-label" for="form-field-2">Meta Keyword </label>                             
                              <?php echo $form->textArea($model, 'meta_keywords', array('class'=>'input-medium search-query span12')); ?>
                          </div>
                       </div>
                      <div class="widget-main">
                          <div class="row-fluid">
                                 <label class="control-label" for="form-field-2">Meta Description </label>                             
                              <?php echo $form->textArea($model, 'meta_description', array('class'=>'input-medium search-query span12')); ?>
                          </div>
                       </div>
                      
                       <div class="widget-main">
                          <div class="row-fluid">
                                <label class="control-label" for="form-field-2">Logo
                                        <span class="help-button" data-rel="popover" data-trigger="hover" data-placement="left" data-content="
                                            Size     : 190x55
                                        " title="Size image">?</span>                 
                                </label>
                                <?php echo $form->fileField($model, 'logo', array('class' => 'id-input-file-1')); ?>
                          </div>
                      </div>
                      
                       <?php if(file_exists('/data/logo/small/'.$model->logo)): ?>
                       <div class="widget-main" >
                                <img style="border: 1px solid #CCCCCC;" src="<?php echo Yii::app()->baseUrl.'/data/logo/small/'. Yii::app()->params['logo']; ?>" />
                       </div>                     
                      <?php endif; ?>
                    
                  </div>
            </div>  

    </div>

    <div style='float:right;width:45%;'>

            <div class="widget-box">
                  <div class="widget-header">
                      <h4>Cài đặt thông tin công ty</h4>

                      <span class="widget-toolbar">
                          <a data-action="collapse" href="#">
                              <i class="icon-chevron-up"></i>
                          </a>
                      </span>
                  </div>

                  <div class="widget-body">
                      
                      <div class="widget-main">
                          <div class="row-fluid">
                               <?php echo $form->labelEx($model, 'email'); ?>
                              <?php echo $form->textField($model, 'email', array('class'=>'input-medium search-query span12')); ?>
                          </div>
                      </div>

                      <div class="widget-main">
                          <div class="row-fluid">
                               <?php echo $form->labelEx($model, 'Địa chỉ'); ?>
                              <?php echo $form->textField($model, 'address', array('class'=>'input-medium search-query span12')); ?>
                          </div>
                      </div>

                      <div class="widget-main">
                          <div class="row-fluid">
                               <?php echo $form->labelEx($model, 'Số điện thoại'); ?>
                              <?php echo $form->textField($model, 'hot_line', array('class'=>'input-medium search-query span12')); ?>
                          </div>
                      </div>

                    <div class="widget-main">
                          <div class="row-fluid">
                               <?php echo $form->labelEx($model, 'facebook'); ?>
                              <?php echo $form->textField($model, 'facebook', array('class'=>'input-medium search-query span12')); ?>
                          </div>
                      </div>
                    <div class="widget-main">
                          <div class="row-fluid">
                               <?php echo $form->labelEx($model, 'link_youtube'); ?>
                              <?php echo $form->textField($model, 'link_youtube', array('class'=>'input-medium search-query span12')); ?>
                          </div>
                      </div>
                      <!--
                        <div class="widget-main">
                          <div class="row-fluid">
                                <label class="control-label" for="form-field-2">background
                                        <span class="help-button" data-rel="popover" data-trigger="hover" data-placement="left" data-content="
                                            Size     : 1606x903
                                        " title="Size image">?</span>                 
                                </label>
                                <?php echo $form->fileField($model, 'background', array('class' => 'id-input-file-1')); ?>
                          </div>
                      </div>
                      
                       <?php if(file_exists('/data/background/small/'.$model->background)): ?>
                       <div class="widget-main" >
                                <img style="border: 1px solid #CCCCCC;" src="<?php echo Yii::app()->baseUrl.'/data/background/small/'. Yii::app()->params['background']; ?>" />
                       </div>                     
                      <?php endif; ?>                    
                  </div>
                  -->
            </div>  

    </div>
<div class="clear" style="clear: both;padding-top:50px;"></div>
        <div class="form-actions" style="clear: both;margin-top:50px;">
                <button type="submit" onclick="$(this).submit();" class="btn btn-info">
                        <i class="icon-ok bigger-110"></i>
                        Submit
                </button>
        </div>
<?php $this->endWidget(); ?>